home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1988 December
/
Ahoy_Magazine_88-12_1988_Double_L.d64
/
Rapid Random I
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
396b
|
13 lines
0 poke53280,1:print"[147]"tab(12)"rapid randomizer":print"please wait..."
1 rem ==================================
2 rem commodares problem #55-2 :
3 rem rapid randomizer
4 rem solution by
5 rem jim borden
6 rem ==================================
10 n=100: dim x(n): for i=1 to n: x(i)=i: next
20 t0=ti
30 forx=1ton:i=rnd(1)*n+1:t=x(x):x(x)=x(i):x(i)=t:next
40 print ti-t0"jiffies"
50 for i=1 to n:print x(i);:next